import { defineStore } from 'pinia'



interface UseUIStoreState {
    classType: string
}


export const UseUIStore = defineStore('UI', {
    state: (): UseUIStoreState => {
        return {
            classType: 'light',
        }
    },
    actions: {
        changeTheme() {
            if (this.classType == 'dark') {
                this.classType = 'light';
                document.documentElement.classList.remove('dark')
            } else {
                this.classType = 'dark';
                document.documentElement.classList.add('dark');
            }
        }
    }
});